#include<iostream>
using namespace std;
const int m = 4, n = 4;
bool Fund(int arr[][n], int m, int n,int key)
{
	int x = 0;
	int y = n - 1;
	while (arr[x][y] != NULL && x < m && y >= 0) {
		if (arr[x][y] < key) {
			x++;
		}
		else if (arr[x][y] > key) {
			y--;
		}
		else {
			return true;
		}
	}
	return false;
}
int main()
{
	int arr[m][n] = { {1,2,8,9},{2,4,9,12},{4,7,10,13},{6,8,11,15} };
	int key = 5;
	if (Fund(arr, m, n,key)) {
		cout << "Finded" << endl;
	}
	else {
		cout << "No" << endl;
	}
	return 0;
}